using System;
using System.Configuration;
using System.Web;
using System.Collections;
using System.Collections.Generic;
using System.Web.Services;
using System.Web.Services.Protocols;

using Com.Grubbland.Data.Access;
using Com.Grubbland.Data.Objects;


/// <summary>
/// Summary description for MessageService
/// </summary>
[WebService(Namespace = "http://eelms.grubbland.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class MessageService : System.Web.Services.WebService {

    private MessageServiceImpl svc = null;
    private string cs = ConfigurationManager.ConnectionStrings["etConnStr"].ConnectionString;

    public MessageService () {

        svc = new MessageServiceImpl(cs); 
    }

    [WebMethod]
    public string HelloWorld() {
        return "Hello World";
    }

    [WebMethod]
    public List<Message> ProcessMessages( string userId, Message[] msgs)
    {
        return svc.ProcessMessages(userId, msgs);
    }

    [WebMethod]
    public bool SendEmail(EEMailMessage msg)
    {
        return svc.SendEmail(msg);
    }
}

